﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MaLu.BusiLogic;
using MaLu.Common;

namespace MaluJg.web.Move
{
    public partial class MView : MovePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                BindData();
            }
        }

        private void BindData()
        {
            DataTable dt = BLMove.GetMoveDetailList(Provider, Year);

            dt.Columns.Add("item1");
            dt.Columns.Add("item2");
            dt.Columns.Add("item3");
            dt.Columns.Add("item4");
          
            foreach (DataRow item in dt.Rows)
            {
                foreach (DataColumn col in dt.Columns)
                {
                    if (col.ColumnName.StartsWith("item") && !col.ColumnName.EndsWith(".aspx"))
                    {
                        item[col.ColumnName] = "<img src=\"../images/green.gif\"";
                        if (! bool.Parse(item[col.ColumnName + ".aspx"].ToString()))
                        {
                            item[col.ColumnName] = "<img src=\"../images/gray.gif\"";
                        }

                    }
                }


            }
            rptProject.DataSource = dt;
            rptProject.DataBind();
        }
    }
}
